import MyProcessTodo from "@/views/process/mytodo";
import ProcessDefine from "@/views/process/definition";
import ProcessTasks from "@/views/process/tasks";
import Login from "@/views/login";
import Home from "@/views/home";
import Diagram from "@/views/diagram";
import Detail from "@/views/process/detail";
import User from "@/views/auth/user";
import Role from "@/views/auth/role";
import Resolve from "@/views/process/resolve";
import Instance from "@/views/process/instance";
import ApplyList from "@/views/process/applyList";
import Apply from "@/views/process/apply";

import { Navigate } from "react-router-dom";

const router = [
  {
    path: "/",
    element: <Navigate to="/bpmn/mytodo" replace={true} />,
  },
  {
    path: "/login",
    element: <Login />,
  },
  // {
  //   path: "/diagram",
  //   element: <Diagram />,
  // },
  {
    path: "/bpmn",
    element: <Home />,
    children: [
      {
        path: "/bpmn/auth/user",
        element: <User />,
      },
      {
        path: "/bpmn/auth/role",
        element: <Role />,
      },
      {
        path: "/bpmn/diagram",
        element: <Diagram />,
      },

      {
        path: "/bpmn/mytodo",
        element: <MyProcessTodo />,
      },
      {
        path: "/bpmn/apply",
        element: <Apply />,
      },
      {
        path: "/bpmn/instance",
        element: <Instance />,
      },
      {
        path: "/bpmn/instance/list",
        element: <ApplyList />,
      },
      {
        path: "/bpmn/process/detail",
        element: <Detail />,
      },
      {
        path: "/bpmn/process/resolve",
        element: <Resolve />,
      },
      {
        path: "/bpmn/process/definition",
        element: <ProcessDefine />,
      },
      {
        path: "/bpmn/process/tasks",
        element: <ProcessTasks />,
      },
    ],
  },
];

export default router;
